import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useSettingStore = defineStore('settingStore', () => {

  const isDay = ref(true)

  const setDay = (boo: boolean) =>  isDay.value = boo

  return {
    isDay,
    setDay
  }
  
}, {
  persist: {
    storage: {
      getItem: (key) => uni.getStorageSync(key),  
      setItem: (key, val) => uni.setStorageSync(key, val)
    }
  }
})